#include <stdafx.h>
#include <LitEditorPrerequisites.h>
#include <qdatetime.h>

namespace Lit
{
	namespace Editor
	{
		
		TimeStamp::TimeStamp() : str(FROM_QT(QTime::currentTime().toString())){}
		TimeStamp::TimeStamp( const TimeStamp& stp ) : str(stp.str){}
		TimeStamp::TimeStamp( const std::string &sstr ) : str(sstr){}
		TimeStamp::~TimeStamp(){}
			
		TimeStamp& TimeStamp::operator = ( const TimeStamp& rhs ){ str=rhs.str; return *this; }
		TimeStamp& TimeStamp::operator = ( const std::string& sstr ){ str=sstr; return *this; }

		TimeStamp& TimeStamp::operator += ( const TimeStamp& rhs ){ str+=rhs.str; return *this; }
		std::string& TimeStamp::operator += ( const std::string& rhs ){ str+=rhs; return str; }

		TimeStamp TimeStamp::operator + ( const TimeStamp& rhs ) const { return TimeStamp( str + rhs.str ); }
		std::string TimeStamp::operator + ( const std::string& rhs ) const { return str + rhs; }

		DateStamp::DateStamp() : str(FROM_QT(QDate::currentDate().toString())){}
		DateStamp::DateStamp( const DateStamp& stp ) : str(stp.str){}
		DateStamp::DateStamp( const std::string &sstr ) : str(sstr){}
		DateStamp::~DateStamp(){}
			
		DateStamp& DateStamp::operator = ( const DateStamp& rhs ){ str=rhs.str; return *this; }
		DateStamp& DateStamp::operator = ( const std::string& sstr ){ str=sstr; return *this; }

		DateStamp& DateStamp::operator += ( const DateStamp& rhs ){ str+=rhs.str; return *this; }
		std::string& DateStamp::operator += ( const std::string& rhs ){ str+=rhs; return str; }

		DateStamp DateStamp::operator + ( const DateStamp& rhs ) const { return DateStamp( str + rhs.str ); }
		std::string DateStamp::operator + ( const std::string& rhs ) const { return str + rhs; }

		FilePath System::EditorPath(){ return FilePath(FileSystem::applicationPath()+"/editor"); }
		FilePath System::EditorUserPath(){ return FilePath(System::EditorPath() + "/UserProjects"); }
	};
};